//
//  ErrorCatchManager.h
//  yqApp
//
//  Created by dqb on 16/7/4.
//  Copyright © 2016年 yq. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger,KNSURLError)
{
    KNSURLErrorUnknown = -1,
    KNSURLErrorCancelled = -999,
    KNSURLErrorBadURL = -1000,
    KNSURLErrorTimedOut = -1001,
    KNSURLErrorUnsupportedURL = -1002,
    KNSURLErrorCannotFindHost = -1003,
    KNSURLErrorCannotConnectToHost = -1004,
    KNSURLErrorDataLengthExceedsMaximum = -1103,
    KNSURLErrorNetworkConnectionLost = -1005,
    KNSURLErrorDNSLookupFailed = -1006,
    KNSURLErrorHTTPTooManyRedirects = -1007,
    KNSURLErrorResourceUnavailable = -1008,
    KNSURLErrorNotConnectedToInternet = -1009,
    KNSURLErrorRedirectToNonExistentLocation = -1010,
    KNSURLErrorBadServerResponse = -1011,
    KNSURLErrorUserCancelledAuthentication = -1012,
    KNSURLErrorUserAuthenticationRequired = -1013,
    KNSURLErrorZeroByteResource = -1014,
    KNSURLErrorCannotDecodeRawData = -1015,
    KNSURLErrorCannotDecodeContentData = -1016,
    KNSURLErrorCannotParseResponse = -1017,
    KNSURLErrorFileDoesNotExist = -1100,
    KNSURLErrorFileIsDirectory = -1101,
    KNSURLErrorNoPermissionsToReadFile = -1102,
    KNSURLErrorSecureConnectionFailed = -1200,
    KNSURLErrorServerCertificateHasBadDate = -1201,
    KNSURLErrorServerCertificateUntrusted = -1202,
    KNSURLErrorServerCertificateHasUnknownRoot = -1203,
    KNSURLErrorServerCertificateNotYetValid = -1204,
    KNSURLErrorClientCertificateRejected = -1205,
    KNSURLErrorClientCertificateRequired = -1206,
    KNSURLErrorCannotLoadFromNetwork = -2000,
    KNSURLErrorCannotCreateFile = -3000,
    KNSURLErrorCannotOpenFile = -3001,
    KNSURLErrorCannotCloseFile = -3002,
    KNSURLErrorCannotWriteToFile = -3003,
    KNSURLErrorCannotRemoveFile = -3004,
    KNSURLErrorCannotMoveFile = -3005,
    KNSURLErrorDownloadDecodingFailedMidStream = -3006,
    KNSURLErrorDownloadDecodingFailedToComplete = -3007
};

@interface APErrorCatchManager : NSObject
+ (APErrorCatchManager *)manager;
- (NSError *)getError:(NSError *)error;
@end
